<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?=HTML::style ('styles/style.css')?>
<?=HTML::script('scripts/jquery-1.7.1.min.js')?>
<title><?=$title?></title>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:100px;">
  <tr>
    <td bgcolor="#FFFFFF">
      <div class="feedback">
        <h3><?=$title?></h3>
        <hr />
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="70" align="center" valign="top"><img src="<?=URL::base()?>images/function/<?=$type?>.gif" alt="" vspace="15" /></td>
            <td width="10"></td>
            <td align="left">
              <p class="fb-message"><?=$message?></p>
              <ul class="fb-links">
                <? if ($links) : ?>
                    <? foreach ($links as $link) : ?>
                    <li><a href="<?=$link['url']?>" title="<?=$link['text']?>" target="<?=$link['target']?>"><?=$link['text']?></a></li>
                    <? endforeach; ?>
                <? else : ?>
                    <li><a href="javascript:history.back();">返回上一页</a></li>
                <? endif; ?>
              </ul>
              <? if ($auto_redirect === TRUE) : ?>
              <div class="fb-redirect">
                  <span id="wait_time"><?=$wait_time?></span> 秒钟后，页面将自动跳转到 【<a href="<?=isset($links[0])?$links[0]['url']:'javascript:history.back()'?>"><?=isset($links[0])?$links[0]['text']:'返回上一页'?></a>】
              </div>
              <? endif; ?>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
</body>
</html>
<? if ($auto_redirect === TRUE) { ?>
<script type="text/javascript">
$().ready(function(){
    var timer;
    var timeout=<?=$wait_time?>;
    function countdown() {
        if (timeout <= 0) {
            <? if (isset($links[0])) { ?>location = '<?=$links[0]['url']?>';<? } else { ?>history.back();<? } ?>
        }
        if (timeout > 0) {
          $('#wait_time').html(timeout);
          timer = setTimeout(countdown, 1000);
        }
        timeout--;
    }
    countdown();

    $(document).keydown(function(event){
        if(event.keyCode == 13) { // 当按下回车键时页面快速跳转
            <? if (isset($links[0])) { ?>location = '<?=$links[0]['url']?>';<? } else { ?>history.back();<? } ?>
        }
    });
});
</script>
<? } ?>